<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Taskflow Handbook</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname"><a href="https://taskflow.github.io/">Taskflow</a>
   &#160;<span id="projectnumber">3.0.0-Master-Branch</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('task_8hpp_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">task.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="task_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;graph.hpp&quot;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacetf.html">tf</a> {</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">// ----------------------------------------------------------------------------</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">// Task Types</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">// ----------------------------------------------------------------------------</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="task_8hpp.html#a0681fa0518bdd3e3d198e1b1b744c06f">   20</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="task_8hpp.html#a0681fa0518bdd3e3d198e1b1b744c06f">TaskType</a> {</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;  PLACEHOLDER_TASK = Node::PLACEHOLDER_TASK,</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#ifdef TF_ENABLE_CUDA</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;  CUDAFLOW_TASK    = Node::CUDAFLOW_TASK,</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;  STATIC_TASK      = Node::STATIC_TASK,</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;  DYNAMIC_TASK     = Node::DYNAMIC_TASK,</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;  CONDITION_TASK   = Node::CONDITION_TASK,</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;  MODULE_TASK      = Node::MODULE_TASK,</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;  ASYNC_TASK       = Node::ASYNC_TASK</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;};</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="task_8hpp.html#ab1887c186d5570390859f16705d79bf6">   35</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="task_8hpp.html#ab1887c186d5570390859f16705d79bf6">task_type_to_string</a>(<a class="code" href="task_8hpp.html#a0681fa0518bdd3e3d198e1b1b744c06f">TaskType</a> type) {</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  <span class="keyword">const</span> <span class="keywordtype">char</span>* val;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;  <span class="keywordflow">switch</span>(type) {</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="keywordflow">case</span> PLACEHOLDER_TASK: val = <span class="stringliteral">&quot;placeholder&quot;</span>; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#ifdef TF_ENABLE_CUDA</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keywordflow">case</span> CUDAFLOW_TASK:    val = <span class="stringliteral">&quot;cudaflow&quot;</span>;    <span class="keywordflow">break</span>;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <span class="keywordflow">case</span> STATIC_TASK:      val = <span class="stringliteral">&quot;static&quot;</span>;      <span class="keywordflow">break</span>;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <span class="keywordflow">case</span> DYNAMIC_TASK:     val = <span class="stringliteral">&quot;subflow&quot;</span>;     <span class="keywordflow">break</span>;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keywordflow">case</span> CONDITION_TASK:   val = <span class="stringliteral">&quot;condition&quot;</span>;   <span class="keywordflow">break</span>;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keywordflow">case</span> MODULE_TASK:      val = <span class="stringliteral">&quot;module&quot;</span>;      <span class="keywordflow">break</span>;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keywordflow">case</span> ASYNC_TASK:       val = <span class="stringliteral">&quot;async&quot;</span>;       <span class="keywordflow">break</span>;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keywordflow">default</span>:               val = <span class="stringliteral">&quot;undefined&quot;</span>;   <span class="keywordflow">break</span>;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;  }</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;  <span class="keywordflow">return</span> val;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;}</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="comment">// ----------------------------------------------------------------------------</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="comment">// Task Traits</span></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="comment">// ----------------------------------------------------------------------------</span></div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> C&gt;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;constexpr <span class="keywordtype">bool</span> is_static_task_v = std::is_invocable_r_v&lt;void, C&gt; &amp;&amp;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;                                 !std::is_invocable_r_v&lt;int, C&gt;;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> C&gt;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;constexpr <span class="keywordtype">bool</span> is_dynamic_task_v = std::is_invocable_r_v&lt;void, C, Subflow&amp;&gt;;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> C&gt;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;constexpr <span class="keywordtype">bool</span> is_condition_task_v = std::is_invocable_r_v&lt;int, C&gt;;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="preprocessor">#ifdef TF_ENABLE_CUDA</span></div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> C&gt;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;constexpr <span class="keywordtype">bool</span> is_cudaflow_task_v = std::is_invocable_r_v&lt;void, C, cudaFlow&amp;&gt; ||</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;                                    std::is_invocable_r_v&lt;void, C, cudaFlowCapturer&amp;&gt;;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;<span class="comment">// ----------------------------------------------------------------------------</span></div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="comment">// Task</span></div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="comment">// ----------------------------------------------------------------------------</span></div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html">  120</a></span>&#160;<span class="keyword">class </span><a class="code" href="classtf_1_1Task.html">Task</a> {</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;  <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classtf_1_1FlowBuilder.html">FlowBuilder</a>;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;  <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classtf_1_1Taskflow.html">Taskflow</a>;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;  <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classtf_1_1TaskView.html">TaskView</a>;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;  </div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;  <span class="keyword">public</span>:</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <a class="code" href="classtf_1_1Task.html#a5ed7ba63e8eeaa0f21fe08c80aa474ba">Task</a>() = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    <a class="code" href="classtf_1_1Task.html#a5ed7ba63e8eeaa0f21fe08c80aa474ba">Task</a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1Task.html">Task</a>&amp; other);</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    </div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <a class="code" href="classtf_1_1Task.html">Task</a>&amp; <a class="code" href="classtf_1_1Task.html#aebdcc47e47a119f261daab673a971458">operator = </a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1Task.html">Task</a>&amp;);</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    </div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    <a class="code" href="classtf_1_1Task.html">Task</a>&amp; <a class="code" href="classtf_1_1Task.html#aebdcc47e47a119f261daab673a971458">operator = </a>(<a class="codeRef" doxygen="/Users/twhuang/PhD/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/types/nullptr_t.html">std::nullptr_t</a>);</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classtf_1_1Task.html#ad87bb498b0a4eae0c375bc59b66dbba8">operator == </a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1Task.html">Task</a>&amp; rhs) <span class="keyword">const</span>;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classtf_1_1Task.html#af4e13636e3a494297b30c2b2e483f095">operator != </a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1Task.html">Task</a>&amp; rhs) <span class="keyword">const</span>;</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    </div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <span class="keyword">const</span> <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&amp; <a class="code" href="classtf_1_1Task.html#a08ada0425b490997b6ff7f310107e5e3">name</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    </div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1Task.html#a1a0afc89e8a6a416c511e74d82df135d">num_successors</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1Task.html#a974dc1d738b62b829ad261beeafbd67c">num_dependents</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    </div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1Task.html#ad49a92e8858c3c298bed0215e341b66b">num_strong_dependents</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1Task.html#af3bf886291af7f39957d43d17083fe07">num_weak_dependents</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    </div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    <a class="code" href="classtf_1_1Task.html">Task</a>&amp; <a class="code" href="classtf_1_1Task.html#a08ada0425b490997b6ff7f310107e5e3">name</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&amp; <a class="code" href="classtf_1_1Task.html#a08ada0425b490997b6ff7f310107e5e3">name</a>);</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> C&gt;</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    <a class="code" href="classtf_1_1Task.html">Task</a>&amp; <a class="code" href="classtf_1_1Task.html#a2f6f4cec42d016e5eb89390f362ffe99">work</a>(C&amp;&amp; callable);</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    </div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    <a class="code" href="classtf_1_1Task.html">Task</a>&amp; <a class="code" href="classtf_1_1Task.html#ac5278492a4d43a191b321eee60e7d629">composed_of</a>(<a class="code" href="classtf_1_1Taskflow.html">Taskflow</a>&amp; taskflow);</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    </div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span>... Ts&gt;</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    <a class="code" href="classtf_1_1Task.html">Task</a>&amp; <a class="code" href="classtf_1_1Task.html#a8c78c453295a553c1c016e4062da8588">precede</a>(Ts&amp;&amp;... tasks);</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;    </div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span>... Ts&gt;</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    <a class="code" href="classtf_1_1Task.html">Task</a>&amp; <a class="code" href="classtf_1_1Task.html#a331b1b726555072e7c7d10941257f664">succeed</a>(Ts&amp;&amp;... tasks);</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;    </div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classtf_1_1Task.html#a302f51ed717d0a4e99edc50f92a571f3">reset</a>();</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classtf_1_1Task.html#aec3ab712e12137542b7e4bc311ee9f20">reset_work</a>();</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classtf_1_1Task.html#a8149edcf9ec2bfac18dd171f7a55ce06">empty</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classtf_1_1Task.html#afc4ecb89dd4e4645b3ec3fb7c1bb0ec5">has_work</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;    </div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> V&gt;</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classtf_1_1Task.html#aff13a503d4a3c994eb08cb6f22e1b427">for_each_successor</a>(V&amp;&amp; visitor) <span class="keyword">const</span>;</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;    </div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> V&gt;</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classtf_1_1Task.html#a3bf68937662bf291637e4a763476b2e4">for_each_dependent</a>(V&amp;&amp; visitor) <span class="keyword">const</span>;</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1Task.html#a1c9301f2a330cc23ee18e8f61688141f">hash_value</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    </div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    <a class="code" href="task_8hpp.html#a0681fa0518bdd3e3d198e1b1b744c06f">TaskType</a> <a class="code" href="classtf_1_1Task.html#af2df95e6c8c5870c033d692e88af0bc2">type</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classtf_1_1Task.html#acf9e6abcb9beb1e42e43e61761bba92b">dump</a>(T&amp; ostream) <span class="keyword">const</span>;</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;  <span class="keyword">private</span>:</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    </div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    <a class="code" href="classtf_1_1Task.html#a5ed7ba63e8eeaa0f21fe08c80aa474ba">Task</a>(Node*);</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    Node* _node {<span class="keyword">nullptr</span>};</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;};</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;<span class="comment">// Constructor</span></div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;<span class="keyword">inline</span> <a class="code" href="classtf_1_1Task.html#a5ed7ba63e8eeaa0f21fe08c80aa474ba">Task::Task</a>(Node* node) : _node {node} {</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;}</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;<span class="comment">// Constructor</span></div><div class="line"><a name="l00300"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#a53deffe60d7c758df4265aeb81063928">  300</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classtf_1_1Task.html#a5ed7ba63e8eeaa0f21fe08c80aa474ba">Task::Task</a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1Task.html">Task</a>&amp; rhs) : _node {rhs._node} {</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;}</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;<span class="comment">// Function: precede</span></div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span>... Ts&gt;</div><div class="line"><a name="l00305"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#a8c78c453295a553c1c016e4062da8588">  305</a></span>&#160;<a class="code" href="classtf_1_1Task.html">Task</a>&amp; <a class="code" href="classtf_1_1Task.html#a8c78c453295a553c1c016e4062da8588">Task::precede</a>(Ts&amp;&amp;... tasks) {</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;  (_node-&gt;_precede(tasks._node), ...);</div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;  <span class="comment">//_precede(std::forward&lt;Ts&gt;(tasks)...);</span></div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;}</div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;</div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;<span class="comment">// Function: succeed</span></div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span>... Ts&gt;</div><div class="line"><a name="l00313"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#a331b1b726555072e7c7d10941257f664">  313</a></span>&#160;<a class="code" href="classtf_1_1Task.html">Task</a>&amp; <a class="code" href="classtf_1_1Task.html#a331b1b726555072e7c7d10941257f664">Task::succeed</a>(Ts&amp;&amp;... tasks) {</div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;  (tasks._node-&gt;_precede(_node), ...);</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;  <span class="comment">//_succeed(std::forward&lt;Ts&gt;(tasks)...);</span></div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;}</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;<span class="comment">// Function: composed_of</span></div><div class="line"><a name="l00320"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#ac5278492a4d43a191b321eee60e7d629">  320</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classtf_1_1Task.html">Task</a>&amp; <a class="code" href="classtf_1_1Task.html#ac5278492a4d43a191b321eee60e7d629">Task::composed_of</a>(<a class="code" href="classtf_1_1Taskflow.html">Taskflow</a>&amp; <a class="code" href="namespacetf.html">tf</a>) {</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;  _node-&gt;_handle.emplace&lt;Node::ModuleTask&gt;(&amp;<a class="code" href="namespacetf.html">tf</a>);</div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;}</div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;<span class="comment">// Operator =</span></div><div class="line"><a name="l00326"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#aebdcc47e47a119f261daab673a971458">  326</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classtf_1_1Task.html">Task</a>&amp; <a class="code" href="classtf_1_1Task.html#aebdcc47e47a119f261daab673a971458">Task::operator = </a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1Task.html">Task</a>&amp; rhs) {</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;  _node = rhs._node;</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;}</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;<span class="comment">// Operator =</span></div><div class="line"><a name="l00332"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#a4b0e3d6a1985a353626c15970c51c820">  332</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classtf_1_1Task.html">Task</a>&amp; <a class="code" href="classtf_1_1Task.html#aebdcc47e47a119f261daab673a971458">Task::operator = </a>(<a class="codeRef" doxygen="/Users/twhuang/PhD/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/types/nullptr_t.html">std::nullptr_t</a> ptr) {</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;  _node = ptr;</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;}</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;<span class="comment">// Operator ==</span></div><div class="line"><a name="l00338"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#ad87bb498b0a4eae0c375bc59b66dbba8">  338</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classtf_1_1Task.html#ad87bb498b0a4eae0c375bc59b66dbba8">Task::operator == </a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1Task.html">Task</a>&amp; rhs)<span class="keyword"> const </span>{</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;  <span class="keywordflow">return</span> _node == rhs._node;</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;}</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;<span class="comment">// Operator !=</span></div><div class="line"><a name="l00343"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#af4e13636e3a494297b30c2b2e483f095">  343</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classtf_1_1Task.html#af4e13636e3a494297b30c2b2e483f095">Task::operator != </a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1Task.html">Task</a>&amp; rhs)<span class="keyword"> const </span>{</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;  <span class="keywordflow">return</span> _node != rhs._node;</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;}</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;<span class="comment">// Function: name</span></div><div class="line"><a name="l00348"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#a9057ecd0f3833b717480e914f8568f02">  348</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classtf_1_1Task.html">Task</a>&amp; <a class="code" href="classtf_1_1Task.html#a08ada0425b490997b6ff7f310107e5e3">Task::name</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&amp; name) {</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;  _node-&gt;_name = <a class="code" href="classtf_1_1Task.html#a08ada0425b490997b6ff7f310107e5e3">name</a>;</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;}</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;</div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;<span class="comment">// Procedure: reset</span></div><div class="line"><a name="l00354"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#a302f51ed717d0a4e99edc50f92a571f3">  354</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtf_1_1Task.html#a302f51ed717d0a4e99edc50f92a571f3">Task::reset</a>() {</div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;  _node = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;}</div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;<span class="comment">// Procedure: reset_work</span></div><div class="line"><a name="l00359"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#aec3ab712e12137542b7e4bc311ee9f20">  359</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtf_1_1Task.html#aec3ab712e12137542b7e4bc311ee9f20">Task::reset_work</a>() {</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;  _node-&gt;_handle = std::monostate{};</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;}</div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;</div><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;<span class="comment">// Function: name</span></div><div class="line"><a name="l00364"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#a08ada0425b490997b6ff7f310107e5e3">  364</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">const</span> <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&amp; <a class="code" href="classtf_1_1Task.html#a08ada0425b490997b6ff7f310107e5e3">Task::name</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;  <span class="keywordflow">return</span> _node-&gt;_name;</div><div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;}</div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;</div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;<span class="comment">// Function: num_dependents</span></div><div class="line"><a name="l00369"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#a974dc1d738b62b829ad261beeafbd67c">  369</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1Task.html#a974dc1d738b62b829ad261beeafbd67c">Task::num_dependents</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;  <span class="keywordflow">return</span> _node-&gt;num_dependents();</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;}</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;<span class="comment">// Function: num_strong_dependents</span></div><div class="line"><a name="l00374"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#ad49a92e8858c3c298bed0215e341b66b">  374</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1Task.html#ad49a92e8858c3c298bed0215e341b66b">Task::num_strong_dependents</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;  <span class="keywordflow">return</span> _node-&gt;num_strong_dependents();</div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;}</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;<span class="comment">// Function: num_weak_dependents</span></div><div class="line"><a name="l00379"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#af3bf886291af7f39957d43d17083fe07">  379</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1Task.html#af3bf886291af7f39957d43d17083fe07">Task::num_weak_dependents</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;  <span class="keywordflow">return</span> _node-&gt;num_weak_dependents();</div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;}</div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;<span class="comment">// Function: num_successors</span></div><div class="line"><a name="l00384"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#a1a0afc89e8a6a416c511e74d82df135d">  384</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1Task.html#a1a0afc89e8a6a416c511e74d82df135d">Task::num_successors</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;  <span class="keywordflow">return</span> _node-&gt;num_successors();</div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;}</div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;<span class="comment">// Function: empty</span></div><div class="line"><a name="l00389"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#a8149edcf9ec2bfac18dd171f7a55ce06">  389</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classtf_1_1Task.html#a8149edcf9ec2bfac18dd171f7a55ce06">Task::empty</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;  <span class="keywordflow">return</span> _node == <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;}</div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;</div><div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;<span class="comment">// Function: has_work</span></div><div class="line"><a name="l00394"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#afc4ecb89dd4e4645b3ec3fb7c1bb0ec5">  394</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classtf_1_1Task.html#afc4ecb89dd4e4645b3ec3fb7c1bb0ec5">Task::has_work</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;  <span class="keywordflow">return</span> _node ? _node-&gt;_handle.index() != 0 : <span class="keyword">false</span>;</div><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;}</div><div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;</div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;<span class="comment">// Function: task_type</span></div><div class="line"><a name="l00399"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#af2df95e6c8c5870c033d692e88af0bc2">  399</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="task_8hpp.html#a0681fa0518bdd3e3d198e1b1b744c06f">TaskType</a> <a class="code" href="classtf_1_1Task.html#af2df95e6c8c5870c033d692e88af0bc2">Task::type</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><a class="code" href="task_8hpp.html#a0681fa0518bdd3e3d198e1b1b744c06f">TaskType</a><span class="keyword">&gt;</span>(_node-&gt;_handle.index());</div><div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;}</div><div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;</div><div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;<span class="comment">// Function: for_each_successor</span></div><div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> V&gt;</div><div class="line"><a name="l00405"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#aff13a503d4a3c994eb08cb6f22e1b427">  405</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classtf_1_1Task.html#aff13a503d4a3c994eb08cb6f22e1b427">Task::for_each_successor</a>(V&amp;&amp; visitor)<span class="keyword"> const </span>{</div><div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;  <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i=0; i&lt;_node-&gt;_successors.size(); ++i) {</div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;    visitor(<a class="code" href="classtf_1_1Task.html#a5ed7ba63e8eeaa0f21fe08c80aa474ba">Task</a>(_node-&gt;_successors[i]));</div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;  }</div><div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;}</div><div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;</div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;<span class="comment">// Function: for_each_dependent</span></div><div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> V&gt;</div><div class="line"><a name="l00413"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#a3bf68937662bf291637e4a763476b2e4">  413</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classtf_1_1Task.html#a3bf68937662bf291637e4a763476b2e4">Task::for_each_dependent</a>(V&amp;&amp; visitor)<span class="keyword"> const </span>{</div><div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;  <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i=0; i&lt;_node-&gt;_dependents.size(); ++i) {</div><div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;    visitor(<a class="code" href="classtf_1_1Task.html#a5ed7ba63e8eeaa0f21fe08c80aa474ba">Task</a>(_node-&gt;_dependents[i]));</div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;  }</div><div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;}</div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;</div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;<span class="comment">// Function: hash_value</span></div><div class="line"><a name="l00420"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#a1c9301f2a330cc23ee18e8f61688141f">  420</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1Task.html#a1c9301f2a330cc23ee18e8f61688141f">Task::hash_value</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;  <span class="keywordflow">return</span> <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/utility/hash.html">std::hash&lt;Node*&gt;</a>{}(_node);</div><div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;}</div><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;</div><div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;<span class="comment">// Procedure: dump</span></div><div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00426"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#acf9e6abcb9beb1e42e43e61761bba92b">  426</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classtf_1_1Task.html#acf9e6abcb9beb1e42e43e61761bba92b">Task::dump</a>(T&amp; os)<span class="keyword"> const </span>{</div><div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;  os &lt;&lt; <span class="stringliteral">&quot;task &quot;</span>;</div><div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;  <span class="keywordflow">if</span>(<a class="code" href="classtf_1_1Task.html#a08ada0425b490997b6ff7f310107e5e3">name</a>().<a class="code" href="classtf_1_1Task.html#a8149edcf9ec2bfac18dd171f7a55ce06">empty</a>()) os &lt;&lt; _node;</div><div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;  <span class="keywordflow">else</span> os &lt;&lt; <a class="code" href="classtf_1_1Task.html#a08ada0425b490997b6ff7f310107e5e3">name</a>();</div><div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;  os &lt;&lt; <span class="stringliteral">&quot; [type=&quot;</span> &lt;&lt; <a class="code" href="task_8hpp.html#ab1887c186d5570390859f16705d79bf6">task_type_to_string</a>(<a class="code" href="classtf_1_1Task.html#af2df95e6c8c5870c033d692e88af0bc2">type</a>()) &lt;&lt; <span class="charliteral">&#39;]&#39;</span>;</div><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;}</div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;</div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;<span class="comment">// Function: work</span></div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> C&gt;</div><div class="line"><a name="l00435"></a><span class="lineno"><a class="line" href="classtf_1_1Task.html#a2f6f4cec42d016e5eb89390f362ffe99">  435</a></span>&#160;<a class="code" href="classtf_1_1Task.html">Task</a>&amp; <a class="code" href="classtf_1_1Task.html#a2f6f4cec42d016e5eb89390f362ffe99">Task::work</a>(C&amp;&amp; c) {</div><div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;  <span class="keywordflow">if</span> constexpr(is_static_task_v&lt;C&gt;) {</div><div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;    _node-&gt;_handle.emplace&lt;Node::StaticTask&gt;(std::forward&lt;C&gt;(c));</div><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;  }</div><div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;  <span class="keywordflow">else</span> <span class="keywordflow">if</span> constexpr(is_dynamic_task_v&lt;C&gt;) {</div><div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;    _node-&gt;_handle.emplace&lt;Node::DynamicTask&gt;(std::forward&lt;C&gt;(c));</div><div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;  }</div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;  <span class="keywordflow">else</span> <span class="keywordflow">if</span> constexpr(is_condition_task_v&lt;C&gt;) {</div><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;    _node-&gt;_handle.emplace&lt;Node::ConditionTask&gt;(std::forward&lt;C&gt;(c));</div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;  }</div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;<span class="preprocessor">#ifdef TF_ENABLE_CUDA</span></div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;  <span class="keywordflow">else</span> <span class="keywordflow">if</span> constexpr(is_cudaflow_task_v&lt;C&gt;) {</div><div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;    _node-&gt;_handle.emplace&lt;Node::cudaFlowTask&gt;(std::forward&lt;C&gt;(c));</div><div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;  }</div><div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;  <span class="keywordflow">else</span> {</div><div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;    static_assert(dependent_false_v&lt;C&gt;, <span class="stringliteral">&quot;invalid task callable&quot;</span>);</div><div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;  }</div><div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;}</div><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;</div><div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;<span class="comment">// ----------------------------------------------------------------------------</span></div><div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;<span class="comment">// global ostream</span></div><div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;<span class="comment">// ----------------------------------------------------------------------------</span></div><div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;</div><div class="line"><a name="l00463"></a><span class="lineno"><a class="line" href="task_8hpp.html#ad216aea4d0f648e149e47374ad015b1f">  463</a></span>&#160;<span class="keyword">inline</span> <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a>&amp; operator &lt;&lt; (<a class="codeRef" doxygen="/Users/twhuang/PhD/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a>&amp; os, <span class="keyword">const</span> <a class="code" href="classtf_1_1Task.html">Task</a>&amp; task) {</div><div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;  task.<a class="code" href="classtf_1_1Task.html#acf9e6abcb9beb1e42e43e61761bba92b">dump</a>(os);</div><div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;  <span class="keywordflow">return</span> os;</div><div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;}</div><div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;</div><div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;<span class="comment">// ----------------------------------------------------------------------------</span></div><div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;</div><div class="line"><a name="l00475"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html">  475</a></span>&#160;<span class="keyword">class </span><a class="code" href="classtf_1_1TaskView.html">TaskView</a> {</div><div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;  </div><div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;  <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classtf_1_1Executor.html">Executor</a>;</div><div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;</div><div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;  <span class="keyword">public</span>:</div><div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;</div><div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;    <a class="code" href="classtf_1_1TaskView.html#ada6755eb9db8badbf290eb25532a8d7f">TaskView</a>() = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;</div><div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;    <a class="code" href="classtf_1_1TaskView.html#ada6755eb9db8badbf290eb25532a8d7f">TaskView</a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1Task.html">Task</a>&amp; task);</div><div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;    </div><div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;    <a class="code" href="classtf_1_1TaskView.html#ada6755eb9db8badbf290eb25532a8d7f">TaskView</a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1TaskView.html">TaskView</a>&amp; other);</div><div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;    </div><div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;    <a class="code" href="classtf_1_1TaskView.html">TaskView</a>&amp; <a class="code" href="classtf_1_1TaskView.html#a6228f57867fcaeec9fd47e58be2773fd">operator = </a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1TaskView.html">TaskView</a>&amp; other);</div><div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;    </div><div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;    <a class="code" href="classtf_1_1TaskView.html">TaskView</a>&amp; <a class="code" href="classtf_1_1TaskView.html#a6228f57867fcaeec9fd47e58be2773fd">operator = </a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1Task.html">Task</a>&amp; other);</div><div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;    </div><div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;    <a class="code" href="classtf_1_1TaskView.html">TaskView</a>&amp; <a class="code" href="classtf_1_1TaskView.html#a6228f57867fcaeec9fd47e58be2773fd">operator = </a>(<a class="codeRef" doxygen="/Users/twhuang/PhD/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/types/nullptr_t.html">std::nullptr_t</a>);</div><div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;</div><div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classtf_1_1TaskView.html#ac31f08774b5cb89bc56367739614abcd">operator == </a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1TaskView.html">TaskView</a>&amp;) <span class="keyword">const</span>;</div><div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;    </div><div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classtf_1_1TaskView.html#adb557ad6ea636a2276022b04062e4725">operator != </a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1TaskView.html">TaskView</a>&amp;) <span class="keyword">const</span>;</div><div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;    </div><div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;    <span class="keyword">const</span> <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&amp; <a class="code" href="classtf_1_1TaskView.html#ac8cd58171de8ab4865e3c3f142db2db1">name</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;    </div><div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1TaskView.html#aff16d269ac75cffa55a312593f20d30d">num_successors</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;</div><div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1TaskView.html#acc4e2bef464e8fbb5706cefdf482a24f">num_dependents</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;    </div><div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1TaskView.html#ac7bcb9cb1ee8f020de56fdbf8e651388">num_strong_dependents</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;</div><div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;    <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1TaskView.html#ad1ddd9a7e68a81feee1785ece99e58f5">num_weak_dependents</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;</div><div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classtf_1_1TaskView.html#a04c63b3e737474fb4157534d8a94eb64">reset</a>();</div><div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;</div><div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classtf_1_1TaskView.html#a29d974f0b79e5e8da9c935dfa28492d9">empty</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;    </div><div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> V&gt;</div><div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classtf_1_1TaskView.html#a3cb647dc0064b5d11e0c87226c47f8f8">for_each_successor</a>(V&amp;&amp; visitor) <span class="keyword">const</span>;</div><div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;    </div><div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">typename</span> V&gt;</div><div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classtf_1_1TaskView.html#a55651e26436bfc2499cadaca4a24e48d">for_each_dependent</a>(V&amp;&amp; visitor) <span class="keyword">const</span>;</div><div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;</div><div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;    <a class="code" href="task_8hpp.html#a0681fa0518bdd3e3d198e1b1b744c06f">TaskType</a> <a class="code" href="classtf_1_1TaskView.html#aa20d7b5796064c3ab194e6d7ebe2adb1">type</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;    </div><div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;  <span class="keyword">private</span>:</div><div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;    </div><div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;    <a class="code" href="classtf_1_1TaskView.html#ada6755eb9db8badbf290eb25532a8d7f">TaskView</a>(Node*);</div><div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;</div><div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;    Node* _node {<span class="keyword">nullptr</span>};</div><div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;};</div><div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;</div><div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;<span class="comment">// Constructor</span></div><div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;<span class="keyword">inline</span> <a class="code" href="classtf_1_1TaskView.html#ada6755eb9db8badbf290eb25532a8d7f">TaskView::TaskView</a>(Node* node) : _node {node} {</div><div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;}</div><div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;</div><div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;<span class="comment">// Constructor</span></div><div class="line"><a name="l00585"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html#a7c7b4378a67f39ee33724a4f96bc6abd">  585</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classtf_1_1TaskView.html#ada6755eb9db8badbf290eb25532a8d7f">TaskView::TaskView</a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1TaskView.html">TaskView</a>&amp; rhs) : _node {rhs._node} {</div><div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;}</div><div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;</div><div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;<span class="comment">// Constructor</span></div><div class="line"><a name="l00589"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html#adcc3095bec2afe51fffb0d2314c0e836">  589</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classtf_1_1TaskView.html#ada6755eb9db8badbf290eb25532a8d7f">TaskView::TaskView</a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1Task.html">Task</a>&amp; task) : _node {task._node} {</div><div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;}</div><div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;</div><div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;<span class="comment">// Operator =</span></div><div class="line"><a name="l00593"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html#a6228f57867fcaeec9fd47e58be2773fd">  593</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classtf_1_1TaskView.html">TaskView</a>&amp; <a class="code" href="classtf_1_1TaskView.html#a6228f57867fcaeec9fd47e58be2773fd">TaskView::operator = </a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1TaskView.html">TaskView</a>&amp; rhs) {</div><div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;  _node = rhs._node;</div><div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;}</div><div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;</div><div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;<span class="comment">// Operator =</span></div><div class="line"><a name="l00599"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html#a4b8af1becc79b92d0f97b8397dc4c05b">  599</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classtf_1_1TaskView.html">TaskView</a>&amp; <a class="code" href="classtf_1_1TaskView.html#a6228f57867fcaeec9fd47e58be2773fd">TaskView::operator = </a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1Task.html">Task</a>&amp; rhs) {</div><div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;  _node = rhs._node;</div><div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;}</div><div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;</div><div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;<span class="comment">// Operator =</span></div><div class="line"><a name="l00605"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html#a148557f80bb73e600c00a4fde25ff5f7">  605</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classtf_1_1TaskView.html">TaskView</a>&amp; <a class="code" href="classtf_1_1TaskView.html#a6228f57867fcaeec9fd47e58be2773fd">TaskView::operator = </a>(<a class="codeRef" doxygen="/Users/twhuang/PhD/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/types/nullptr_t.html">std::nullptr_t</a> ptr) {</div><div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;  _node = ptr;</div><div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160;}</div><div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160;</div><div class="line"><a name="l00610"></a><span class="lineno">  610</span>&#160;<span class="comment">// Function: name</span></div><div class="line"><a name="l00611"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html#ac8cd58171de8ab4865e3c3f142db2db1">  611</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">const</span> <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&amp; <a class="code" href="classtf_1_1TaskView.html#ac8cd58171de8ab4865e3c3f142db2db1">TaskView::name</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00612"></a><span class="lineno">  612</span>&#160;  <span class="keywordflow">return</span> _node-&gt;_name;</div><div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;}</div><div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;</div><div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;<span class="comment">// Function: num_dependents</span></div><div class="line"><a name="l00616"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html#acc4e2bef464e8fbb5706cefdf482a24f">  616</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1TaskView.html#acc4e2bef464e8fbb5706cefdf482a24f">TaskView::num_dependents</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;  <span class="keywordflow">return</span> _node-&gt;num_dependents();</div><div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;}</div><div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;</div><div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;<span class="comment">// Function: num_strong_dependents</span></div><div class="line"><a name="l00621"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html#ac7bcb9cb1ee8f020de56fdbf8e651388">  621</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1TaskView.html#ac7bcb9cb1ee8f020de56fdbf8e651388">TaskView::num_strong_dependents</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00622"></a><span class="lineno">  622</span>&#160;  <span class="keywordflow">return</span> _node-&gt;num_strong_dependents();</div><div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160;}</div><div class="line"><a name="l00624"></a><span class="lineno">  624</span>&#160;</div><div class="line"><a name="l00625"></a><span class="lineno">  625</span>&#160;<span class="comment">// Function: num_weak_dependents</span></div><div class="line"><a name="l00626"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html#ad1ddd9a7e68a81feee1785ece99e58f5">  626</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1TaskView.html#ad1ddd9a7e68a81feee1785ece99e58f5">TaskView::num_weak_dependents</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;  <span class="keywordflow">return</span> _node-&gt;num_weak_dependents();</div><div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;}</div><div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;</div><div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;<span class="comment">// Function: num_successors</span></div><div class="line"><a name="l00631"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html#aff16d269ac75cffa55a312593f20d30d">  631</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1TaskView.html#aff16d269ac75cffa55a312593f20d30d">TaskView::num_successors</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;  <span class="keywordflow">return</span> _node-&gt;num_successors();</div><div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;}</div><div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;</div><div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;<span class="comment">// Function: reset</span></div><div class="line"><a name="l00636"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html#a04c63b3e737474fb4157534d8a94eb64">  636</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtf_1_1TaskView.html#a04c63b3e737474fb4157534d8a94eb64">TaskView::reset</a>() {</div><div class="line"><a name="l00637"></a><span class="lineno">  637</span>&#160;  _node = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00638"></a><span class="lineno">  638</span>&#160;}</div><div class="line"><a name="l00639"></a><span class="lineno">  639</span>&#160;</div><div class="line"><a name="l00640"></a><span class="lineno">  640</span>&#160;<span class="comment">// Function: empty</span></div><div class="line"><a name="l00641"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html#a29d974f0b79e5e8da9c935dfa28492d9">  641</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classtf_1_1TaskView.html#a29d974f0b79e5e8da9c935dfa28492d9">TaskView::empty</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00642"></a><span class="lineno">  642</span>&#160;  <span class="keywordflow">return</span> _node == <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00643"></a><span class="lineno">  643</span>&#160;}</div><div class="line"><a name="l00644"></a><span class="lineno">  644</span>&#160;</div><div class="line"><a name="l00645"></a><span class="lineno">  645</span>&#160;<span class="comment">// Function: type</span></div><div class="line"><a name="l00646"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html#aa20d7b5796064c3ab194e6d7ebe2adb1">  646</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="task_8hpp.html#a0681fa0518bdd3e3d198e1b1b744c06f">TaskType</a> <a class="code" href="classtf_1_1TaskView.html#aa20d7b5796064c3ab194e6d7ebe2adb1">TaskView::type</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><a class="code" href="task_8hpp.html#a0681fa0518bdd3e3d198e1b1b744c06f">TaskType</a><span class="keyword">&gt;</span>(_node-&gt;_handle.index());</div><div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160;}</div><div class="line"><a name="l00649"></a><span class="lineno">  649</span>&#160;</div><div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160;<span class="comment">// Operator ==</span></div><div class="line"><a name="l00651"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html#ac31f08774b5cb89bc56367739614abcd">  651</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classtf_1_1TaskView.html#ac31f08774b5cb89bc56367739614abcd">TaskView::operator == </a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1TaskView.html">TaskView</a>&amp; rhs)<span class="keyword"> const </span>{</div><div class="line"><a name="l00652"></a><span class="lineno">  652</span>&#160;  <span class="keywordflow">return</span> _node == rhs._node;</div><div class="line"><a name="l00653"></a><span class="lineno">  653</span>&#160;}</div><div class="line"><a name="l00654"></a><span class="lineno">  654</span>&#160;</div><div class="line"><a name="l00655"></a><span class="lineno">  655</span>&#160;<span class="comment">// Operator !=</span></div><div class="line"><a name="l00656"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html#adb557ad6ea636a2276022b04062e4725">  656</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classtf_1_1TaskView.html#adb557ad6ea636a2276022b04062e4725">TaskView::operator != </a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1TaskView.html">TaskView</a>&amp; rhs)<span class="keyword"> const </span>{</div><div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;  <span class="keywordflow">return</span> _node != rhs._node;</div><div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;}</div><div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160;</div><div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;<span class="comment">// Function: for_each_successor</span></div><div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> V&gt;</div><div class="line"><a name="l00662"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html#a3cb647dc0064b5d11e0c87226c47f8f8">  662</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classtf_1_1TaskView.html#a3cb647dc0064b5d11e0c87226c47f8f8">TaskView::for_each_successor</a>(V&amp;&amp; visitor)<span class="keyword"> const </span>{</div><div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;  <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i=0; i&lt;_node-&gt;_successors.size(); ++i) {</div><div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;    visitor(<a class="code" href="classtf_1_1TaskView.html#ada6755eb9db8badbf290eb25532a8d7f">TaskView</a>(_node-&gt;_successors[i]));</div><div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;  }</div><div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;}</div><div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;</div><div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;<span class="comment">// Function: for_each_dependent</span></div><div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> V&gt;</div><div class="line"><a name="l00670"></a><span class="lineno"><a class="line" href="classtf_1_1TaskView.html#a55651e26436bfc2499cadaca4a24e48d">  670</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classtf_1_1TaskView.html#a55651e26436bfc2499cadaca4a24e48d">TaskView::for_each_dependent</a>(V&amp;&amp; visitor)<span class="keyword"> const </span>{</div><div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;  <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i=0; i&lt;_node-&gt;_dependents.size(); ++i) {</div><div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;    visitor(<a class="code" href="classtf_1_1TaskView.html#ada6755eb9db8badbf290eb25532a8d7f">TaskView</a>(_node-&gt;_dependents[i]));</div><div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;  }</div><div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;}</div><div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;</div><div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160;}  <span class="comment">// end of namespace tf. ---------------------------------------------------</span></div><div class="line"><a name="l00677"></a><span class="lineno">  677</span>&#160;</div><div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacestd.html">std</a> {</div><div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;</div><div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;<span class="keyword">template</span> &lt;&gt;</div><div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160;<span class="keyword">struct </span>hash&lt;<a class="code" href="namespacetf.html">tf</a>::Task&gt; {</div><div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;  <span class="keyword">auto</span> <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/utility/hash/operator().html">operator() </a>(<span class="keyword">const</span> <a class="code" href="classtf_1_1Task.html">tf::Task</a>&amp; task) <span class="keyword">const</span> noexcept {</div><div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;    <span class="keywordflow">return</span> task.hash_value();</div><div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160;  }</div><div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;};</div><div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;</div><div class="line"><a name="l00693"></a><span class="lineno">  693</span>&#160;}  <span class="comment">// end of namespace std ----------------------------------------------------</span></div><div class="line"><a name="l00694"></a><span class="lineno">  694</span>&#160;</div><div class="line"><a name="l00695"></a><span class="lineno">  695</span>&#160;</div><div class="line"><a name="l00696"></a><span class="lineno">  696</span>&#160;</div><div class="ttc" id="classtf_1_1Task_html_a974dc1d738b62b829ad261beeafbd67c"><div class="ttname"><a href="classtf_1_1Task.html#a974dc1d738b62b829ad261beeafbd67c">tf::Task::num_dependents</a></div><div class="ttdeci">size_t num_dependents() const</div><div class="ttdoc">queries the number of predecessors of the task </div><div class="ttdef"><b>Definition:</b> task.hpp:369</div></div>
<div class="ttc" id="task_8hpp_html_a0681fa0518bdd3e3d198e1b1b744c06f"><div class="ttname"><a href="task_8hpp.html#a0681fa0518bdd3e3d198e1b1b744c06f">tf::TaskType</a></div><div class="ttdeci">TaskType</div><div class="ttdoc">enumeration of all task types </div><div class="ttdef"><b>Definition:</b> task.hpp:20</div></div>
<div class="ttc" id="classtf_1_1Task_html_aec3ab712e12137542b7e4bc311ee9f20"><div class="ttname"><a href="classtf_1_1Task.html#aec3ab712e12137542b7e4bc311ee9f20">tf::Task::reset_work</a></div><div class="ttdeci">void reset_work()</div><div class="ttdoc">resets the associated work to a placeholder </div><div class="ttdef"><b>Definition:</b> task.hpp:359</div></div>
<div class="ttc" id="classtf_1_1Task_html_a302f51ed717d0a4e99edc50f92a571f3"><div class="ttname"><a href="classtf_1_1Task.html#a302f51ed717d0a4e99edc50f92a571f3">tf::Task::reset</a></div><div class="ttdeci">void reset()</div><div class="ttdoc">resets the task handle to null </div><div class="ttdef"><b>Definition:</b> task.hpp:354</div></div>
<div class="ttc" id="classtf_1_1TaskView_html_ada6755eb9db8badbf290eb25532a8d7f"><div class="ttname"><a href="classtf_1_1TaskView.html#ada6755eb9db8badbf290eb25532a8d7f">tf::TaskView::TaskView</a></div><div class="ttdeci">TaskView()=default</div><div class="ttdoc">constructs an empty task view </div></div>
<div class="ttc" id="classtf_1_1TaskView_html_adb557ad6ea636a2276022b04062e4725"><div class="ttname"><a href="classtf_1_1TaskView.html#adb557ad6ea636a2276022b04062e4725">tf::TaskView::operator!=</a></div><div class="ttdeci">bool operator!=(const TaskView &amp;) const</div><div class="ttdoc">compares if two taskviews are associated with different tasks </div><div class="ttdef"><b>Definition:</b> task.hpp:656</div></div>
<div class="ttc" id="classtf_1_1TaskView_html_a55651e26436bfc2499cadaca4a24e48d"><div class="ttname"><a href="classtf_1_1TaskView.html#a55651e26436bfc2499cadaca4a24e48d">tf::TaskView::for_each_dependent</a></div><div class="ttdeci">void for_each_dependent(V &amp;&amp;visitor) const</div><div class="ttdoc">applies an visitor callable to each dependents of the task </div><div class="ttdef"><b>Definition:</b> task.hpp:670</div></div>
<div class="ttc" id="classtf_1_1TaskView_html_aa20d7b5796064c3ab194e6d7ebe2adb1"><div class="ttname"><a href="classtf_1_1TaskView.html#aa20d7b5796064c3ab194e6d7ebe2adb1">tf::TaskView::type</a></div><div class="ttdeci">TaskType type() const</div><div class="ttdoc">queries the task type </div><div class="ttdef"><b>Definition:</b> task.hpp:646</div></div>
<div class="ttc" id="classtf_1_1TaskView_html_ad1ddd9a7e68a81feee1785ece99e58f5"><div class="ttname"><a href="classtf_1_1TaskView.html#ad1ddd9a7e68a81feee1785ece99e58f5">tf::TaskView::num_weak_dependents</a></div><div class="ttdeci">size_t num_weak_dependents() const</div><div class="ttdoc">queries the number of weak dependents of the task </div><div class="ttdef"><b>Definition:</b> task.hpp:626</div></div>
<div class="ttc" id="classtf_1_1Task_html_ac5278492a4d43a191b321eee60e7d629"><div class="ttname"><a href="classtf_1_1Task.html#ac5278492a4d43a191b321eee60e7d629">tf::Task::composed_of</a></div><div class="ttdeci">Task &amp; composed_of(Taskflow &amp;taskflow)</div><div class="ttdoc">creates a module task from a taskflow </div><div class="ttdef"><b>Definition:</b> task.hpp:320</div></div>
<div class="ttc" id="namespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div></div>
<div class="ttc" id="classtf_1_1TaskView_html_aff16d269ac75cffa55a312593f20d30d"><div class="ttname"><a href="classtf_1_1TaskView.html#aff16d269ac75cffa55a312593f20d30d">tf::TaskView::num_successors</a></div><div class="ttdeci">size_t num_successors() const</div><div class="ttdoc">queries the number of successors of the task </div><div class="ttdef"><b>Definition:</b> task.hpp:631</div></div>
<div class="ttc" id="namespacetf_html"><div class="ttname"><a href="namespacetf.html">tf</a></div><div class="ttdef"><b>Definition:</b> flow_builder.hpp:9</div></div>
<div class="ttc" id="classtf_1_1Task_html_ad87bb498b0a4eae0c375bc59b66dbba8"><div class="ttname"><a href="classtf_1_1Task.html#ad87bb498b0a4eae0c375bc59b66dbba8">tf::Task::operator==</a></div><div class="ttdeci">bool operator==(const Task &amp;rhs) const</div><div class="ttdoc">compares if two tasks are associated with the same graph node </div><div class="ttdef"><b>Definition:</b> task.hpp:338</div></div>
<div class="ttc" id="task_8hpp_html_ab1887c186d5570390859f16705d79bf6"><div class="ttname"><a href="task_8hpp.html#ab1887c186d5570390859f16705d79bf6">tf::task_type_to_string</a></div><div class="ttdeci">const char * task_type_to_string(TaskType type)</div><div class="ttdoc">convert a task type to a human-readable string </div><div class="ttdef"><b>Definition:</b> task.hpp:35</div></div>
<div class="ttc" id="basic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div></div>
<div class="ttc" id="classtf_1_1Task_html_a331b1b726555072e7c7d10941257f664"><div class="ttname"><a href="classtf_1_1Task.html#a331b1b726555072e7c7d10941257f664">tf::Task::succeed</a></div><div class="ttdeci">Task &amp; succeed(Ts &amp;&amp;... tasks)</div><div class="ttdoc">adds precedence links from other tasks to this </div><div class="ttdef"><b>Definition:</b> task.hpp:313</div></div>
<div class="ttc" id="classtf_1_1TaskView_html_a3cb647dc0064b5d11e0c87226c47f8f8"><div class="ttname"><a href="classtf_1_1TaskView.html#a3cb647dc0064b5d11e0c87226c47f8f8">tf::TaskView::for_each_successor</a></div><div class="ttdeci">void for_each_successor(V &amp;&amp;visitor) const</div><div class="ttdoc">applies an visitor callable to each successor of the task </div><div class="ttdef"><b>Definition:</b> task.hpp:662</div></div>
<div class="ttc" id="classtf_1_1Task_html_af4e13636e3a494297b30c2b2e483f095"><div class="ttname"><a href="classtf_1_1Task.html#af4e13636e3a494297b30c2b2e483f095">tf::Task::operator!=</a></div><div class="ttdeci">bool operator!=(const Task &amp;rhs) const</div><div class="ttdoc">compares if two tasks are not associated with the same graph node </div><div class="ttdef"><b>Definition:</b> task.hpp:343</div></div>
<div class="ttc" id="hash_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/hash.html">std::hash</a></div></div>
<div class="ttc" id="classtf_1_1TaskView_html_a29d974f0b79e5e8da9c935dfa28492d9"><div class="ttname"><a href="classtf_1_1TaskView.html#a29d974f0b79e5e8da9c935dfa28492d9">tf::TaskView::empty</a></div><div class="ttdeci">bool empty() const</div><div class="ttdoc">queries if the task view is empty </div><div class="ttdef"><b>Definition:</b> task.hpp:641</div></div>
<div class="ttc" id="classtf_1_1TaskView_html_ac7bcb9cb1ee8f020de56fdbf8e651388"><div class="ttname"><a href="classtf_1_1TaskView.html#ac7bcb9cb1ee8f020de56fdbf8e651388">tf::TaskView::num_strong_dependents</a></div><div class="ttdeci">size_t num_strong_dependents() const</div><div class="ttdoc">queries the number of strong dependents of the task </div><div class="ttdef"><b>Definition:</b> task.hpp:621</div></div>
<div class="ttc" id="classtf_1_1Task_html_aebdcc47e47a119f261daab673a971458"><div class="ttname"><a href="classtf_1_1Task.html#aebdcc47e47a119f261daab673a971458">tf::Task::operator=</a></div><div class="ttdeci">Task &amp; operator=(const Task &amp;)</div><div class="ttdoc">replaces the contents with a copy of the other task </div><div class="ttdef"><b>Definition:</b> task.hpp:326</div></div>
<div class="ttc" id="classtf_1_1Task_html_a3bf68937662bf291637e4a763476b2e4"><div class="ttname"><a href="classtf_1_1Task.html#a3bf68937662bf291637e4a763476b2e4">tf::Task::for_each_dependent</a></div><div class="ttdeci">void for_each_dependent(V &amp;&amp;visitor) const</div><div class="ttdoc">applies an visitor callable to each dependents of the task </div><div class="ttdef"><b>Definition:</b> task.hpp:413</div></div>
<div class="ttc" id="classtf_1_1Taskflow_html"><div class="ttname"><a href="classtf_1_1Taskflow.html">tf::Taskflow</a></div><div class="ttdoc">main entry to create a task dependency graph </div><div class="ttdef"><b>Definition:</b> core/taskflow.hpp:62</div></div>
<div class="ttc" id="classtf_1_1Task_html_a08ada0425b490997b6ff7f310107e5e3"><div class="ttname"><a href="classtf_1_1Task.html#a08ada0425b490997b6ff7f310107e5e3">tf::Task::name</a></div><div class="ttdeci">const std::string &amp; name() const</div><div class="ttdoc">queries the name of the task </div><div class="ttdef"><b>Definition:</b> task.hpp:364</div></div>
<div class="ttc" id="classtf_1_1TaskView_html"><div class="ttname"><a href="classtf_1_1TaskView.html">tf::TaskView</a></div><div class="ttdoc">class to access task information from the observer interface </div><div class="ttdef"><b>Definition:</b> task.hpp:475</div></div>
<div class="ttc" id="operator()_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/hash/operator().html">std::hash::operator()</a></div><div class="ttdeci">T operator()(T... args)</div></div>
<div class="ttc" id="classtf_1_1Task_html_a8149edcf9ec2bfac18dd171f7a55ce06"><div class="ttname"><a href="classtf_1_1Task.html#a8149edcf9ec2bfac18dd171f7a55ce06">tf::Task::empty</a></div><div class="ttdeci">bool empty() const</div><div class="ttdoc">queries if the task handle points to a task node </div><div class="ttdef"><b>Definition:</b> task.hpp:389</div></div>
<div class="ttc" id="classtf_1_1TaskView_html_a04c63b3e737474fb4157534d8a94eb64"><div class="ttname"><a href="classtf_1_1TaskView.html#a04c63b3e737474fb4157534d8a94eb64">tf::TaskView::reset</a></div><div class="ttdeci">void reset()</div><div class="ttdoc">resets to an empty view </div><div class="ttdef"><b>Definition:</b> task.hpp:636</div></div>
<div class="ttc" id="classtf_1_1Task_html_ad49a92e8858c3c298bed0215e341b66b"><div class="ttname"><a href="classtf_1_1Task.html#ad49a92e8858c3c298bed0215e341b66b">tf::Task::num_strong_dependents</a></div><div class="ttdeci">size_t num_strong_dependents() const</div><div class="ttdoc">queries the number of strong dependents of the task </div><div class="ttdef"><b>Definition:</b> task.hpp:374</div></div>
<div class="ttc" id="classtf_1_1FlowBuilder_html"><div class="ttname"><a href="classtf_1_1FlowBuilder.html">tf::FlowBuilder</a></div><div class="ttdoc">building methods of a task dependency graph </div><div class="ttdef"><b>Definition:</b> flow_builder.hpp:17</div></div>
<div class="ttc" id="classtf_1_1Task_html_a1a0afc89e8a6a416c511e74d82df135d"><div class="ttname"><a href="classtf_1_1Task.html#a1a0afc89e8a6a416c511e74d82df135d">tf::Task::num_successors</a></div><div class="ttdeci">size_t num_successors() const</div><div class="ttdoc">queries the number of successors of the task </div><div class="ttdef"><b>Definition:</b> task.hpp:384</div></div>
<div class="ttc" id="classtf_1_1Task_html_af3bf886291af7f39957d43d17083fe07"><div class="ttname"><a href="classtf_1_1Task.html#af3bf886291af7f39957d43d17083fe07">tf::Task::num_weak_dependents</a></div><div class="ttdeci">size_t num_weak_dependents() const</div><div class="ttdoc">queries the number of weak dependents of the task </div><div class="ttdef"><b>Definition:</b> task.hpp:379</div></div>
<div class="ttc" id="classtf_1_1Task_html"><div class="ttname"><a href="classtf_1_1Task.html">tf::Task</a></div><div class="ttdoc">handle to a node in a task dependency graph </div><div class="ttdef"><b>Definition:</b> task.hpp:120</div></div>
<div class="ttc" id="classtf_1_1Task_html_acf9e6abcb9beb1e42e43e61761bba92b"><div class="ttname"><a href="classtf_1_1Task.html#acf9e6abcb9beb1e42e43e61761bba92b">tf::Task::dump</a></div><div class="ttdeci">void dump(T &amp;ostream) const</div><div class="ttdoc">dumps the task through an output stream </div><div class="ttdef"><b>Definition:</b> task.hpp:426</div></div>
<div class="ttc" id="classtf_1_1Task_html_a8c78c453295a553c1c016e4062da8588"><div class="ttname"><a href="classtf_1_1Task.html#a8c78c453295a553c1c016e4062da8588">tf::Task::precede</a></div><div class="ttdeci">Task &amp; precede(Ts &amp;&amp;... tasks)</div><div class="ttdoc">adds precedence links from this to other tasks </div><div class="ttdef"><b>Definition:</b> task.hpp:305</div></div>
<div class="ttc" id="classtf_1_1Task_html_aff13a503d4a3c994eb08cb6f22e1b427"><div class="ttname"><a href="classtf_1_1Task.html#aff13a503d4a3c994eb08cb6f22e1b427">tf::Task::for_each_successor</a></div><div class="ttdeci">void for_each_successor(V &amp;&amp;visitor) const</div><div class="ttdoc">applies an visitor callable to each successor of the task </div><div class="ttdef"><b>Definition:</b> task.hpp:405</div></div>
<div class="ttc" id="nullptr_t_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/nullptr_t.html">std::nullptr_t</a></div></div>
<div class="ttc" id="classtf_1_1Task_html_a5ed7ba63e8eeaa0f21fe08c80aa474ba"><div class="ttname"><a href="classtf_1_1Task.html#a5ed7ba63e8eeaa0f21fe08c80aa474ba">tf::Task::Task</a></div><div class="ttdeci">Task()=default</div><div class="ttdoc">constructs an empty task </div></div>
<div class="ttc" id="classtf_1_1Executor_html"><div class="ttname"><a href="classtf_1_1Executor.html">tf::Executor</a></div><div class="ttdoc">execution interface for running a taskflow graph </div><div class="ttdef"><b>Definition:</b> executor.hpp:28</div></div>
<div class="ttc" id="classtf_1_1TaskView_html_a6228f57867fcaeec9fd47e58be2773fd"><div class="ttname"><a href="classtf_1_1TaskView.html#a6228f57867fcaeec9fd47e58be2773fd">tf::TaskView::operator=</a></div><div class="ttdeci">TaskView &amp; operator=(const TaskView &amp;other)</div><div class="ttdoc">replaces the contents with a copy of the other task </div><div class="ttdef"><b>Definition:</b> task.hpp:593</div></div>
<div class="ttc" id="classtf_1_1Task_html_a1c9301f2a330cc23ee18e8f61688141f"><div class="ttname"><a href="classtf_1_1Task.html#a1c9301f2a330cc23ee18e8f61688141f">tf::Task::hash_value</a></div><div class="ttdeci">size_t hash_value() const</div><div class="ttdoc">obtains a hash value of the underlying node </div><div class="ttdef"><b>Definition:</b> task.hpp:420</div></div>
<div class="ttc" id="basic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a></div></div>
<div class="ttc" id="classtf_1_1Task_html_af2df95e6c8c5870c033d692e88af0bc2"><div class="ttname"><a href="classtf_1_1Task.html#af2df95e6c8c5870c033d692e88af0bc2">tf::Task::type</a></div><div class="ttdeci">TaskType type() const</div><div class="ttdoc">returns the task type </div><div class="ttdef"><b>Definition:</b> task.hpp:399</div></div>
<div class="ttc" id="classtf_1_1TaskView_html_ac31f08774b5cb89bc56367739614abcd"><div class="ttname"><a href="classtf_1_1TaskView.html#ac31f08774b5cb89bc56367739614abcd">tf::TaskView::operator==</a></div><div class="ttdeci">bool operator==(const TaskView &amp;) const</div><div class="ttdoc">compares if two taskviews are associated with the same task </div><div class="ttdef"><b>Definition:</b> task.hpp:651</div></div>
<div class="ttc" id="classtf_1_1TaskView_html_acc4e2bef464e8fbb5706cefdf482a24f"><div class="ttname"><a href="classtf_1_1TaskView.html#acc4e2bef464e8fbb5706cefdf482a24f">tf::TaskView::num_dependents</a></div><div class="ttdeci">size_t num_dependents() const</div><div class="ttdoc">queries the number of predecessors of the task </div><div class="ttdef"><b>Definition:</b> task.hpp:616</div></div>
<div class="ttc" id="classtf_1_1Task_html_a2f6f4cec42d016e5eb89390f362ffe99"><div class="ttname"><a href="classtf_1_1Task.html#a2f6f4cec42d016e5eb89390f362ffe99">tf::Task::work</a></div><div class="ttdeci">Task &amp; work(C &amp;&amp;callable)</div><div class="ttdoc">assigns a callable </div><div class="ttdef"><b>Definition:</b> task.hpp:435</div></div>
<div class="ttc" id="classtf_1_1Task_html_afc4ecb89dd4e4645b3ec3fb7c1bb0ec5"><div class="ttname"><a href="classtf_1_1Task.html#afc4ecb89dd4e4645b3ec3fb7c1bb0ec5">tf::Task::has_work</a></div><div class="ttdeci">bool has_work() const</div><div class="ttdoc">queries if the task has a work assigned </div><div class="ttdef"><b>Definition:</b> task.hpp:394</div></div>
<div class="ttc" id="classtf_1_1TaskView_html_ac8cd58171de8ab4865e3c3f142db2db1"><div class="ttname"><a href="classtf_1_1TaskView.html#ac8cd58171de8ab4865e3c3f142db2db1">tf::TaskView::name</a></div><div class="ttdeci">const std::string &amp; name() const</div><div class="ttdoc">queries the name of the task </div><div class="ttdef"><b>Definition:</b> task.hpp:611</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_88dad41ea55ca2177e141d32a93e931c.html">taskflow</a></li><li class="navelem"><a class="el" href="dir_220cd4d9b8cb38c840b455d5d75c25bb.html">core</a></li><li class="navelem"><a class="el" href="task_8hpp.html">task.hpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
